/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.insurance.cis.utils;

import java.awt.Component;
import javax.swing.JOptionPane;

/**
 *
 * @author TruongLQ
 */
public final class MessageDialogUtils {
    private static final String ERROR_DIALOG_TITLE = "Error dialog";
    private static final String INFORMATION_DIALOG_TITLE = "Information dialog";
    private static final String CONFIRMATION_DIALOG_TITLE = "Confirmation dialog";
    private MessageDialogUtils() {
        throw new AssertionError("Can not initialize MessageDialogUtils class");
    }
    
    public static void dialogError(Component component, String message) {
        JOptionPane.showMessageDialog(component, message, 
                    ERROR_DIALOG_TITLE, JOptionPane.ERROR_MESSAGE);
    }
    public static void dialogMessage(Component component, String message) {
        JOptionPane.showMessageDialog(component, message, 
                    INFORMATION_DIALOG_TITLE, JOptionPane.INFORMATION_MESSAGE);
    }
    public static int dialogQuestion(Component component, String message, int type) {
        return JOptionPane.showConfirmDialog(component, message, 
                    CONFIRMATION_DIALOG_TITLE, type);
    }
}
